import { useState } from 'react';
import { Button } from 'antd';
import TableModal from './ProcessConfigModal';
import { TextWidget } from '@inbiz/react';
const ConfigButton = (props: any) => {
  const [tableVisible, $tableVisible] = useState(false);

  return (
    <>
      <Button type="primary" onClick={() => $tableVisible(true)}>
        <TextWidget>processButton.config</TextWidget>
      </Button>
      <TableModal
        tableVisible={tableVisible}
        $tableVisible={$tableVisible}
        onChange={props.onChange}
        value={props.value}
        buttontype={props.type}
      />
    </>
  );
};

export default ConfigButton;
